<?php
use frontendm\models\WB_UserTaskOperate;
$countHidden = frontendm\models\WB_TaskHidden::find()->where("userid=" . Yii::$app->user->id)->count();
$taskcount = WB_UserTaskOperate::find()->where("userid=" . Yii::$app->user->id)->count();
$countuptask = WB_UserTaskOperate::find()->where("status=1 and userid=" . Yii::$app->user->id)->count();
$countnouptask = WB_UserTaskOperate::find()->where("status=0 and userid=" . Yii::$app->user->id)->count();
$countcomplain1 = WB_UserTaskOperate::find()->where("is_complain=1 and userid=" . Yii::$app->user->id)->count();
$countcomplain3 = WB_UserTaskOperate::find()->where("is_complain=3 and userid=" . Yii::$app->user->id)->count();
/**
 * @author shuang
 * @date 2016-12-5 17:41:41
 */
use yii\helpers\Url;
$this->title = "任务中心";
?>
<div class="content native-scroll">
    <div class="list-block">
        <ul>
            <li class="item-content">
                <div class="item-inner">
                    <div class="item-title">已获得皓币</div>
                    <div class="item-after">
                        <span class="clr-green"><?php echo $amount;?></span> 
                        <span class="clr-lightgray">元</span>
                    </div>
                </div>
            </li>
            <li class="item-content">
                <div class="item-inner">
                    <div class="item-title">进行中的任务</div>
                    <div class="item-after"><span class="badge badge-blue"><?php echo $countnouptask;?></span></div>
                </div>
            </li>
            <li class="item-content">
                <div class="item-inner">
                    <div class="item-title">待审核的任务</div>
                    <div class="item-after"><span class="badge badge-gray"><?php echo $countcomplain1;?></span></div>
                </div>
            </li>
            <li class="item-content">
                <div class="item-inner">
                    <div class="item-title">已完成的任务</div>
                    <div class="item-after"><span class="badge badge-green"><?php echo $countuptask;?></span></div>
                </div>
            </li>
            <li class="item-content">
                <div class="item-inner">
                    <div class="item-title">审核不通过的任务</div>
                    <div class="item-after"><span class="badge badge-red"><?php echo $countcomplain3;?></span></div>
                </div>
            </li>
            <li class="item-content">
                <div class="item-inner">
                    <div class="item-title">主动隐藏的任务</div>
                    <div class="item-after"><span class="badge badge-orange"><?php echo $countHidden;?></span></div>
                </div>
            </li>
        </ul>
    </div>
    <div class="content-block">
        <div class="row">
            <div class="col-50">
                <a href="<?php echo Url::toRoute(["task/mynowork"]); ?>" data-no-cache="true" class="button button-fill button-big">
                    <span class="iconfont i-squa-check"></span>&nbsp;&nbsp;进行中任务
                </a>
            </div>
            <div class="col-50">
                <a href="<?php echo Url::toRoute(["task/mywork"]); ?>" data-no-cache="true" class="button button-fill button-big button-success">
                    <span class="iconfont i-roundcheck"></span>&nbsp;&nbsp;做过的任务
                </a>
            </div>
        </div>
    </div>
    <!--    <div class="content-block center-block">
            <a href="#" class="button button-big btn-qrcode">
                <span class="iconfont i-code"></span>&nbsp;&nbsp;还可在微端做任务
            </a>
        </div>-->

</div>

<div class="popup popup-subscribe">
    <div class="content-block center-block">
        <p>
            <img class="qrcode-image" style="width:80%;" />
            <br/><span class="size-08">投手公众号二维码</span>
        </p>
    </div>
    <div class="content-block">
        <div class="row">
            <div class="col-50">
                <a href="#" class="button button-success btn-suss-subscribe">完成</a>
            </div>
            <div class="col-50">
                <a href="#" class="button close-popup">返回</a>
            </div>
        </div>
    </div>
</div>
<div class="popup-overlay"></div>